CC = gcc
COMPILE_FLAG = -O0 -Wall

SRC_DIRECTORY := src
BUILD_DIRECTORY := obj
INCLUDES := -I include 

LIBS = 

all: progress_before_starting progress_term progress_id progress_fork progress_fork2 progress_fork3 progress_fork4 \
	 progress_file_append progress_link progress_fan progress_orphan progress_zombie progress_wait progress_waitpid \
	 progress_exec progress_system progress_mysystem

progress_before_starting:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_before_starting $(SRC_DIRECTORY)/progress_before_starting.c  $(LIBS) 

progress_term:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_term $(SRC_DIRECTORY)/progress_term.c  $(LIBS) 	

progress_id:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_id $(SRC_DIRECTORY)/progress_id.c  $(LIBS) 

progress_fork:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_fork $(SRC_DIRECTORY)/progress_fork.c  $(LIBS) 

progress_fork2:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_fork2 $(SRC_DIRECTORY)/progress_fork2.c  $(LIBS) 

progress_fork3:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_fork3 $(SRC_DIRECTORY)/progress_fork3.c  $(LIBS) 

progress_fork4:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_fork4 $(SRC_DIRECTORY)/progress_fork4.c  $(LIBS) 

progress_file_append:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_file_append $(SRC_DIRECTORY)/progress_file_append.c  $(LIBS)

progress_link:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_link $(SRC_DIRECTORY)/progress_link.c  $(LIBS)

progress_fan:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_fan $(SRC_DIRECTORY)/progress_fan.c  $(LIBS)
	
progress_orphan:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_orphan $(SRC_DIRECTORY)/progress_orphan.c  $(LIBS)

progress_zombie:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_zombie $(SRC_DIRECTORY)/progress_zombie.c  $(LIBS)

progress_wait:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_wait $(SRC_DIRECTORY)/progress_wait.c  $(LIBS)

progress_waitpid:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_waitpid $(SRC_DIRECTORY)/progress_waitpid.c  $(LIBS)

progress_exec:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_exec $(SRC_DIRECTORY)/progress_exec.c  $(LIBS)

progress_system:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_system $(SRC_DIRECTORY)/progress_system.c  $(LIBS)

progress_mysystem:
	@test -d $(BUILD_DIRECTORY) || mkdir $(BUILD_DIRECTORY)
	$(CC) -g -rdynamic $(INCLUDES)   $(COMPILE_FLAG)  -o $(BUILD_DIRECTORY)/progress_mysystem $(SRC_DIRECTORY)/progress_mysystem.c  $(LIBS)

clean:
	rm -rf $(BUILD_DIRECTORY)/*